<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="./vue.js"></script>
  
</head>
<body>
  <div id="app">
    {{ num | currency  }}
  </div>
  <script>
    // 给  number自动加 ￥
   /*  Vue.filter('currency',(v)=>{
      console.log(v);
      return  "￥"+v;
    }) */
    let vm = new Vue({
      el:"#app",
      data:{
        num:10
      },
      filters:{
        currency:(v)=>{
          return "￥"+v
        }
      }

    })
  </script>
</body>
</html>